<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h2>用户注册</h2> 
	<form action="/library01/register.do" method="POST" enctype="multipart/form-data">
		用户名:<input type="text" name="username">
		<% 
			if("-1".equals(request.getAttribute("msg"))){
				out.print("<span>用户名已经被使用</span>");
			}
		%>
		<br>
		密码:<input type="password" name="password"> <br>
		
		性别:<input type="radio" name="sex" value="男">男
		<input type="radio" name="sex" value="女">女 <br>	
		真实姓名:<input type="text" name="realName"> <br>
		年龄:<input type="number" name="age"> <br>
		电话:<input type="text" name="phone">
		<%
		if("-2".equals(request.getAttribute("msg"))){
			out.print("<span>电话已经被注册</span>");
		}
		%>
		<br>
		<input type="file" name="headImg" accept="image/*">${headMsg}<br>
		<input type="submit" value="注册">
	</form>
</body>
</html>